package com.rinzin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @BelongsProject:workspace
 * @BelongsPackage:com.rinzin.controller
 * @Author:Rinzin
 * @CreateTime:2021-04-01-21-08
 * @Description:springboot整合jsp项目
 **/
@Controller
public class JspController {

    @RequestMapping("/index")
    public String index(){

        return "index";
    }
    @RequestMapping("/index/data")
    public ModelAndView indexForData(){
        ModelAndView modelAndView = new ModelAndView("indexfordata");
        modelAndView.addObject("data","This is my jsp");
        return modelAndView;
    }
}
